/* Background.cpp
Creating an ocean background using an image
March 28, 2013
*/

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <iostream>
using namespace std;

int main( int argc, char * args[]){
  SDL_Surface* screen = NULL;
  SDL_Surface* reefbackground = NULL;
  //Uint32 clearColor;

  SDL_Init(SDL_INIT_EVERYTHING);

  screen = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE);

  //load image
  reefbackground = IMG_Load("reef.png"); 

  //apply image to screen
  SDL_BlitSurface(reefbackground, NULL, screen, NULL);
  //update screen
  SDL_Flip(screen);
  //pause
  SDL_Delay(5000);
  //free loaded image
  SDL_FreeSurface(reefbackground);

  SDL_Quit();
  return 0;

}
